<style>
.content{margin:0px auto;width:960px;padding:0px;}
form{padding:0px;margin:0px;}
fieldset{display:block;width:760px;;margin:10px auto;padding:0px;}
.frm_item{font-size:14px;height:25px;line-height:25px;margin-bottom:10px;text-align:left;}
.frm_item label{float:left;display:inline;width:180px;text-align:right;margin:0px;padding:0px;}
.frm_item .frm_input{float:left;display:inline;margin-left:8px;padding:0px;vertical-align:middle;}
.frm_input label{float:none;display:inline;width:auto;text-align:left;}
.submit{text-align:center;}
.input_text{width:200px;}
</style>

<div id="main_content">

  <form id="form1" name="form1" method="post" action="?mo=action&domo=config&do=save">
  	<fieldset>
	<legend>{$GLOBALS['db_set']}</legend>
  	<div class="frm_item">
	  <label for="db_host">数据库主机</label>
		<div class="frm_input">
			<input name="cfg[db_host]" type="text" id="db_host" value="{$db_host}" class="input_text" />
			<input name="cfgdesc[db_host]" type="hidden" value="数据库主机" />
		</div>
		<span>
			&nbsp;数据库服务器地址，一般为localhost
		</span>
	</div>
  	<div class="frm_item">
	  <label for="db_port">连接端口</label>
		<div class="frm_input">
			<input name="cfg[db_port]" type="text" id="db_port" value="{$db_port}" class="input_text" />
			<input name="cfgdesc[db_port]" type="hidden" value="数据库主机" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="db_charset">数据库编码</label>
		<div class="frm_input">
            <select name="cfg[db_charset]" id="db_charset">
              <option value="utf8"{if $db_charset=='utf8'} selected="selected"{/if}>UTF-8</option>
              <option value="gbk"{if $db_charset=='gbk'} selected="selected"{/if}>GBK</option>
              <option value="gb2312"{if $db_charset=='gb2312'} selected="selected"{/if}>GB2312</option>
              <option value="big5"{if $db_charset=='big5'} selected="selected"{/if}>BIG5</option>
            </select>
			<input name="cfgdesc[db_charset]" type="hidden" value="数据库编码" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="db_name">数据库名称</label>
		<div class="frm_input">
			<input name="cfg[db_name]" type="text" id="db_name" value="{$db_name}" class="input_text" />
			<input name="cfgdesc[db_name]" type="hidden" value="数据库名称" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="db_user">数据库账号</label>
		<div class="frm_input">
			<input name="cfg[db_user]" type="text" id="db_user" value="{$db_user}" class="input_text" />
			<input name="cfgdesc[db_user]" type="hidden" value="数据库账号" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="db_pass">数据库密码</label>
		<div class="frm_input">
			<input name="cfg[db_pass]" type="text" id="db_pass" value="{$db_pass}" class="input_text" />
			<input name="cfgdesc[db_pass]" type="hidden" value="数据库密码" />
		</div>
	</div>
	</fieldset>
  	<fieldset>
	<legend>{$GLOBALS['base_info']}</legend>
  	<div class="frm_item">
		<label for="app_name">站点名称</label>
		<div class="frm_input">
			<input name="cfg[app_name]" type="text" id="app_name" value="{$app_name}" class="input_text" />
			<input name="cfgdesc[app_name]" type="hidden" value="当前程序名称" />
        </div>
	</div>
  	<div class="frm_item">
		<label for="app_subtitle">站点副标题</label>
		<div class="frm_input">
			<input name="cfg[app_subtitle]" type="text" id="app_subtitle" value="{$app_subtitle}" class="input_text" />
			<input name="cfgdesc[app_subtitle]" type="hidden" value="站点副标题" />
		</div>
	</div>
  	<div class="frm_item">
		<label for="server_domain">域名</label>
		<div class="frm_input">
			<input name="cfg[server_domain]" type="text" id="server_domain" value="{$server_domain}" class="input_text" />
			<input name="cfgdesc[server_domain]" type="hidden" value="站点域名" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="cfg_theme">使用模板</label>
		<div class="frm_input">
			<select name="cfg[cfg_theme]" id="cfg_theme">
              {loop $tpl_list $tpl_name $tpl_text}
			  <option value="{$tpl_name}"{if $cfg_theme==$tpl_name} selected="selected"{/if}>{$tpl_text}</option>
              {/loop}
			</select>
			<input name="cfgdesc[cfg_theme]" type="hidden" value="使用模板" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="lang">默认语言</label>
		<div class="frm_input">
			<select name="cfg[lang]" id="lang">
			  <option value="zh-cn">简体中文</option>
			  <option value="zh">繁体中文</option>
			  <option value="en">英文</option>
			  <option value="jp">日文</option>
			</select>
			<input name="cfgdesc[lang]" type="hidden" value="默认语言" />
		</div>
	</div>
  	<div class="frm_item">
		<label for="date_default_timezone">默认时区</label>
		<div class="frm_input">
			<select name="cfg[date_default_timezone]" id="date_default_timezone">
			  <option value="asia/shanghai">中国标准时间</option>
			  <option value="asia/tokyo">日本东京</option>
			  <option value="europe/london">英国伦敦</option>
			</select>
			<input name="cfgdesc[date_default_timezone]" type="hidden" value="默认时区" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="charset">站点编码</label>
		<div class="frm_input">
			<select name="cfg[charset]" id="charset">
              <option value="utf-8"{if $charset=='utf-8'} selected="selected"{/if}>UTF-8</option>
              <option value="gbk"{if $charset=='gbk'} selected="selected"{/if}>GBK</option>
              <option value="gb2312"{if $charset=='gb2312'} selected="selected"{/if}>GB2312</option>
              <option value="big5"{if $charset=='big5'} selected="selected"{/if}>BIG5</option>
			</select>
			<input name="cfgdesc[charset]" type="hidden" value="程序编码" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="version">程序版本</label>
		<div class="frm_input">
			<input name="cfg[version]" type="text" id="version" value="{$version}" class="input_text" />
			<input name="cfgdesc[version]" type="hidden" value="程序版本" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="icp_code">icp备案号</label>
		<div class="frm_input">
			<input name="cfg[icp_code]" type="text" id="icp_code" value="{$icp_code}" class="input_text" />
			<input name="cfgdesc[icp_code]" type="hidden" value="icp备案号" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="copyright">COPYRIGHT</label>
		<div class="frm_input">
			<input name="cfg[copyright]" type="text" id="copyright" value="{$copyright}" class="input_text" />
			<input name="cfgdesc[copyright]" type="hidden" value="COPYRIGHT" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="admin_email">站长联系邮箱</label>
		<div class="frm_input">
			<input name="cfg[admin_email]" type="text" id="admin_email" value="{$admin_email}" class="input_text" />
			<input name="cfgdesc[admin_email]" type="hidden" value="站长联系邮箱" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="site_keyword">网站关键字</label>
		<div class="frm_input">
			<input name="cfg[site_keyword]" type="text" id="site_keyword" value="{$site_keyword}" class="input_text" />
			<input name="cfgdesc[site_keyword]" type="hidden" value="网站关键字" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="site_description">网站简介描述</label>
		<div class="frm_input">
			<input name="cfg[site_description]" type="text" id="site_description" value="{$site_description}" class="input_text" />
			<input name="cfgdesc[site_description]" type="hidden" value="网站简介描述" />
		</div>
	</div>
	</fieldset>
    
    <fieldset>
	<legend>{$GLOBALS['sys_info']}</legend>
  	<div class="frm_item">
		<label for="path_max_file_num">目录包含的最多文件数</label>
		<div class="frm_input">
			<input name="cfg[path_max_file_num]" type="text" id="path_max_file_num" value="{$path_max_file_num}" class="input_text" />
</div>
			<input name="cfgdesc[path_max_file_num]" type="hidden" value="每个目录能包含的最多文件数" />
	</div>
	</fieldset>
	
  	<fieldset>
	<legend>{$GLOBALS['mail_set']}</legend>
  	<div class="frm_item">
	  <label for="mail_word_wrap">邮件内容换行的字符数</label>
		<div class="frm_input">
			<input name="cfg[mail_word_wrap]" type="text" id="mail_word_wrap" value="{$mail_word_wrap}" class="input_text" />
			<input name="cfgdesc[mail_word_wrap]" type="hidden" value="邮件内容换行的字符数" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="mail_is_html">是否支持html格式邮件</label>
		<div class="frm_input">
			<input name="cfg[mail_is_html]" type="radio" id="mail_is_html_1" value="1"{if !defined('mail_is_html') || mail_is_html} checked="checked"{/if} />
			<label for="mail_is_html_1">是</label>
			&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="radio" name="cfg[mail_is_html]" id="mail_is_html_0" value="0"{if defined('mail_is_html') && !mail_is_html} checked="checked"{/if} />
		  	<label for="mail_is_html_0">否</label>
			
	  		<input name="cfgdesc[mail_is_html]" type="hidden" value="是否支持html格式邮件" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="send_mail_type">发送邮件方式</label>
		<div class="frm_input">
			<select name="cfg[send_mail_type]" id="send_mail_type">
			  <option value="mail">系统mail</option>
			  <option value="smtp" selected="selected">smtp</option>
		  </select>
			<input name="cfgdesc[send_mail_type]" type="hidden" value="发送邮件方式" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="smtp_ssl">是否ssl加密</label>
		<div class="frm_input">
			<input name="cfg[smtp_ssl]" type="radio" id="smtp_ssl_1" value="1"{if defined('smtp_ssl') && smtp_ssl} checked="checked"{/if} />
			<label for="smtp_ssl_1">是</label>
			&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="radio" name="cfg[smtp_ssl]" id="smtp_ssl_0" value="0"{if !defined('smtp_ssl') || !smtp_ssl} checked="checked"{/if} />
		  	<label for="smtp_ssl_0">否</label>
			
	  		<input name="cfgdesc[smtp_ssl]" type="hidden" value="是否ssl加密" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="smtp_host">smtp 主机地址</label>
		<div class="frm_input">
			<input name="cfg[smtp_host]" type="text" id="smtp_host" value="{$smtp_host}" class="input_text" />
			<input name="cfgdesc[smtp_host]" type="hidden" value="smtp 主机地址" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="smtp_port">smtp 端口号</label>
		<div class="frm_input">
			<input name="cfg[smtp_port]" type="text" id="smtp_port" value="{$smtp_port}" class="input_text" />
			<input name="cfgdesc[smtp_port]" type="hidden" value="smtp 端口号" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="smtp_user">smtp 账号</label>
		<div class="frm_input">
			<input name="cfg[smtp_user]" type="text" id="smtp_user" value="{$smtp_user}" class="input_text" />
			<input name="cfgdesc[smtp_user]" type="hidden" value="smtp 账号" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="smtp_pass">smtp 密码</label>
		<div class="frm_input">
			<input name="cfg[smtp_pass]" type="text" id="smtp_pass" value="{$smtp_pass}" class="input_text" />
			<input name="cfgdesc[smtp_pass]" type="hidden" value="smtp 密码" />
		</div>
	</div>
	</fieldset>
	
  	<fieldset>
	<legend>{$GLOBALS['user_set']}({$GLOBALS['default_set_notneed_modify']})</legend>
  	<div class="frm_item">
	  <label for="cfg[use_session]">是否启用session</label>
		<div class="frm_input">
			<input type="radio" name="cfg[use_session]" id="use_session_1" value="1"{if !isset($use_session) || $use_session} checked="checked"{/if} />
			<label for="use_session_1">是</label>
			&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="radio" name="cfg[use_session]" id="use_session_0" value="0"{if isset($use_session) && !$use_session} checked="checked"{/if} />
		  	<label for="use_session_0">否</label>
			<input name="cfgdesc[use_session]" type="hidden" value="是否启用session" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="cfg[session_time]">SESSION有效期</label>
		<div class="frm_input">
          <select name="cfg[session_time]" id="cfg[session_time]">
		    <option value="1800"{if $session_time=='1800'} selected="selected"{/if}>0.5小时</option>
		    <option value="3600"{if $session_time=='3600'} selected="selected"{/if}>1小时</option>
		    <option value="10800"{if $session_time=='10800'} selected="selected"{/if}>3小时</option>
		    <option value="36000"{if $session_time=='36000'} selected="selected"{/if}>10小时</option>
		    <option value="86400"{if $session_time=='86400'} selected="selected"{/if}>24小时</option>
	      </select>
			<input name="cfgdesc[session_time]" type="hidden" value="SESSION有效期" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="cfg[ck_expire]">COOKIE有效期</label>
		<div class="frm_input">
          <select name="cfg[ck_expire]" id="cfg[ck_expire]">
		    <option value="1800"{if $ck_expire=='1800'} selected="selected"{/if}>0.5小时</option>
		    <option value="3600"{if $ck_expire=='3600'} selected="selected"{/if}>1小时</option>
		    <option value="10800"{if $ck_expire=='10800'} selected="selected"{/if}>3小时</option>
		    <option value="36000"{if $ck_expire=='36000'} selected="selected"{/if}>10小时</option>
		    <option value="86400"{if $ck_expire=='86400'} selected="selected"{/if}>24小时</option>
	      </select>
			<input name="cfgdesc[ck_expire]" type="hidden" value="COOKIE有效期" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="cfg[username_is_email]">用户名必须是email</label>
		<div class="frm_input">
			<input type="radio" name="cfg[username_is_email]" id="username_is_email_1" value="1"{if !isset($username_is_email) || $user_need_active} checked="checked"{/if} />
			<label for="username_is_email_1">是</label>
			&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="radio" name="cfg[username_is_email]" id="username_is_email_0" value="0"{if isset($username_is_email) && !$user_need_active} checked="checked"{/if} />
		  	<label for="username_is_email_0">否</label>
			<input name="cfgdesc[username_is_email]" type="hidden" value="用户名就用email" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="cfg[user_need_active">用户是否需要激活</label>
		<div class="frm_input">
			<input name="cfg[user_need_active]" type="radio" id="user_need_active_1" value="1"{if !isset($user_need_active) || $user_need_active} checked="checked"{/if} />
			<label for="user_need_active_1">是</label>
			&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="radio" name="cfg[user_need_active]" id="user_need_active_0" value="0"{if isset($user_need_active) && !$user_need_active} checked="checked"{/if} />
		  	<label for="user_need_active_0">否</label>
			<input name="cfgdesc[user_need_active]" type="hidden" value="用户是否需要激活" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="username_max_len">用户名最大长度</label>
		<div class="frm_input">
			<input name="cfg[username_max_len]" type="text" id="username_max_len" value="{if isset($username_max_len)}{$username_max_len}{else}16{/if}" class="input_text" />
			<input name="cfgdesc[username_max_len]" type="hidden" value="用户名最大长度" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="username_min_len">用户名最小长度</label>
		<div class="frm_input">
			<input name="cfg[username_min_len]" type="text" id="username_min_len" value="{if isset($username_min_len)}{$username_min_len}{else}3{/if}" class="input_text" />
			<input name="cfgdesc[username_min_len]" type="hidden" value="用户名最小长度" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="first_login_coin">第一次登录获取金币</label>
		<div class="frm_input">
			<input name="cfg[first_login_coin]" type="text" id="first_login_coin" value="{if isset($first_login_coin)}{$first_login_coin}{else}1000{/if}" class="input_text" />
			<input name="cfgdesc[first_login_coin]" type="hidden" value="第一次登录获取金币" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="first_login_point">第一次登录获取积分</label>
		<div class="frm_input">
			<input name="cfg[first_login_point]" type="text" id="first_login_point" value="{if isset($first_login_point)}{$first_login_point}{else}0{/if}" class="input_text" />
			<input name="cfgdesc[first_login_point]" type="hidden" value="第一次登录获取积分" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="first_login_credit">第一次登录获取声望</label>
		<div class="frm_input">
			<input name="cfg[first_login_credit]" type="text" id="first_login_credit" value="{if isset($first_login_credit)}{$first_login_credit}{else}0{/if}" class="input_text" />
			<input name="cfgdesc[first_login_credit]" type="hidden" value="第一次登录获取声望" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="first_login_honor">第一次登录获取荣誉</label>
		<div class="frm_input">
			<input name="cfg[first_login_honor]" type="text" id="first_login_honor" value="{if isset($first_login_honor)}{$first_login_honor}{else}0{/if}" class="input_text" />
			<input name="cfgdesc[first_login_honor]" type="hidden" value="第一次登录获取荣誉" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="page_break">文章内分页标志</label>
		<div class="frm_input">
			<input name="cfg[page_break]" type="text" id="page_break" value="{if isset($page_break)}{$page_break}{else}<!--page-->{/if}" class="input_text" />
			<input name="cfgdesc[page_break]" type="hidden" value="文章内分页标志" />
			一般按默认值即可
		</div>
	</div>
  	<div class="frm_item">
	  <label for="powered_by">powered_by</label>
		<div class="frm_input">
			<input name="cfg[powered_by]" type="text" id="powered_by" value="{if isset($powered_by)}{$powered_by}{else}phpfo.com{/if}" class="input_text" />
			<input name="cfgdesc[powered_by]" type="hidden" value="powered_by" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="default_comment_status">用户评论默认状态</label>
		<div class="frm_input">
		  <select name="cfg[default_comment_status]" id="cfg[default_comment_status]">
		    <option value="0"{if $default_comment_status=='0'} selected="selected"{/if}>待审核</option>
		    <option value="1"{if $default_comment_status=='1'} selected="selected"{/if}>正常</option>
	      </select>
		  <input name="cfgdesc[default_comment_status]" type="hidden" value="用户评论默认状态" />
		</div>
	</div>
	</fieldset>
	
  	<fieldset>
	<legend>{$GLOBALS['admin_set']}</legend>
  	<div class="frm_item">
	  <label for="admin_user">管理员账号</label>
		<div class="frm_input">
			<input name="admin_user" type="text" id="admin_user" value="admin" class="input_text" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="admin_pass">管理员密码</label>
		<div class="frm_input">
			<input type="password" name="admin_pass" id="admin_pass" value="" class="input_text" />
		</div>
	</div>
  	<div class="frm_item">
	  <label for="admin_pass2">管理员重复密码</label>
		<div class="frm_input">
			<input type="password" name="admin_pass2" id="admin_pass2" value="" class="input_text" />
		</div>
	</div>
	</fieldset>
	
	<div class="content submit">
		<input type="submit" name="submit" id="submit" value="确定" />
	</div>

  </form>


</div>